<?php

namespace App\Admin\Actions\Grid\RowActions;

use App\Admin\Forms\BoundUserForm;
use App\Admin\Forms\IsCarefree as AppIsCarefree;
use App\Admin\Forms\OverTodo as AppOverTodo;
use Dcat\Admin\Widgets\Modal;
use Dcat\Admin\Grid\RowAction;

class BoundUserActions extends RowAction
{
    protected $title = '   <i class="feather icon-external-link text-custom"></i> <span class="text-custom" title="">绑定客户</span> &emsp;';

    public function render()
    {
        // 实例化表单类并传递自定义参数
        $form = BoundUserForm::make()->payload(['id' => $this->getKey()]);

        return Modal::make()
            ->lg()
            ->title($this->title)
            ->body($form)
            ->button($this->title);
    }
}
